import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Layout from '@/views/layout/Layout'
// import login from '@/components/login'

Vue.use(Router)


export const constantRouterMap = [

  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path*',
        component: () => import('@/views/redirect/index')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  }
 ,
  {
    path: '',
    component: Layout,
    redirect: 'homePage',
    children: [
      {
        path: 'homePage',
        component: () => import('@/views/homePage/index'),
        name: 'homePage',
        meta: {title: '首页', icon: 'homePage', noCache: true}
      }
    ]
  }
]


export default new Router({
  mode: 'history',
  routes: constantRouterMap
})
